package org.credo.jws.failure;

import java.net.MalformedURLException;
import java.net.URL;
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
import javax.xml.ws.WebEndpoint;
import javax.xml.ws.WebServiceClient;


@WebServiceClient(name = "MMS", targetNamespace = "http://tempuri.org/", wsdlLocation = "http://mmsplat.eucp.b2m.cn/mmscenterinterface/MMS.asmx?wsdl")
public class MMS extends Service{
	private final static URL MMS_WSDL_LOCATION;
	
	static {
		URL url = null;
		try {
			URL baseUrl;
			baseUrl = MMS.class.getResource(".");
			System.out.println("baseUrl:"+baseUrl);
			url = new URL(baseUrl, "http://mmsplat.eucp.b2m.cn/mmscenterinterface/MMS.asmx?wsdl");
			System.out.println("url:"+url);
		} catch (MalformedURLException e) {
			e.printStackTrace();
		}
		MMS_WSDL_LOCATION = url;
	}
	
	public MMS(URL wsdlLocation, QName serviceName) {
		super(wsdlLocation, serviceName);
	}

	public MMS() {
		super(MMS_WSDL_LOCATION, new QName("http://tempuri.org/", "MMS"));
	}
	
	@WebEndpoint(name = "MMSSoap")
	public JWS getMMSSoap() {
		return super.getPort(new QName("http://tempuri.org/", "MMSSoap"), JWS.class);
	}

	public JWS getMMSSoap12() {
		return super.getPort(new QName("http://tempuri.org/", "MMSSoap12"), JWS.class);
	}
	
	
	
}
